home *** CD-ROM | disk | FTP | other *** search
- X11 Driver for Hippo
- ====================
-
- The X Driver for Hippo uses only standard XLIB calls and should work with
- X11R4 and X11R5. There are a number of known bugs and limitations which are
- documented below.
-
- *** If you are not familiar with X, please look at x11test for a simple
- example of using this driver.
-
- Usage
- -----
-
- The compile flag to select the X driver is:
-
- _X11_PLOT_
-
- To select X as the output device use...
-
- h_setPlotDrvr(X11PLOT);
-
- When calling h_plot to draw a hippo plot to an X window, four additional
- arguments must be given to the h_plot call.
-
- int h_plot(display disp, Display *dpy, Screen *scrn, Drawable Wind, GC gc);
-
- Where:
-
- disp is the Hippo plot to be drawn.
- dpy is the X display pointer.
- scrn is the X screen pointer for the screen on which the window resides
- wind is the window or Pixmap into which the plot is to be drawn.
- gc is a graphics context suitable for use with wind. The graphics
- context is used to specify the background color for the plot and
- can also be used to specify a clip mask (may be useful when handling
- exposure events).
-
- The plot will be scaled to fill the specified drawable. Note that this
- routine is intended to be used as a fairly low level routine in some
- application requiring X display of histograms. The application is
- responsible for handling expose events, and for dealing with redrawing the
- plot if the window is resized. A simple example of how to use the X11
- driver is given in the demonstration program x11test supplied with hippo.
-
- Known bugs and limitations
- --------------------------
-
- A number of bugs and limitations are known to exist in this version of
- hippo's X11 driver. These are documented below. Any offers to fix or
- improve any of these features will be warmly received. The assumption made
- in designing hippo's X11 driver is that it will be used for interactive
- applications where very high speed redrawing of the display is required.
- The desire to avoid duplication of potentially time-consuming tasks is what
- leads to a number of the limitiations below.
-
- 1) Only Color and Black and White X servers supported.
-
- The current version of the X11 driver only supports color X servers with
- dynamically allocatable color maps, and black and white servers. All other
- servers (eg grey scale or displays with static color maps) are treated as
- if they were black and white.
-
- 2) Crude recovery for unallocatable color map entries.
-
- If the X11 driver is unable to allocate all of the color map entries that
- it wants it issues a one time error message, but then continues execution,
- resulting in displays which will have "random" colors. A better
- implementation would attempt to adjust its display philosophy to the number
- of colors available. To display both color and gray scale plots requires a
- total of nearly 200 hundred color map entries, so a screen depth of a least
- 8 is required.
-
- 3) Crude lego plot.
-
- The lego plot implemented in the current version of the X11 driver is
- intended merely as a proof of principle, rather than a full implementation.
- There is no support for labeling the axes, for changing the Z axis or for
- changing the stereo angle. In addition the drawing speed could be improved.
- Also the plot doesn't always fir in the window
-
- 4) Text handling problems.
-
- For flexiblity the current version of the X11 driver works with all version
- of X after X11R4. No use has been made of the more advanced text handling
- features of X11R5. The main limitations imposed by this are in text sizing
- and rotated text. The X11 driver attempts to choose an appropriate sized
- font, but this process does not always work perfectly. Rotated text is
- handled in a manner which requires copying pixmaps between the server and
- client. To speed this process up the X11 driver maintains a cache of
- previously copied strings which it attempts to reuse. This normally works
- ok, but if some graphics attribute (such as the background color) is
- changed dynamically the rotated text may be drawn with the old attribute.
-
- This could be improved by generating a version of the X11 driver which uses
- X11R5 when it is available.
-
- 5) Support for multiple display devices.
-
- The first time a plot is drawn to an X device, the X11 driver caches
- certain characteristics of the server, such as which fonts are available
- and what type of device it is. If multiple display devices with different
- characteristics are used from the same job this will cause problems.
-